<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <base href="<%=basePath%>">
    
    <title>主界面</title>
    <link href="css/bootstrap.min.css" rel="stylesheet">
	<script src="js/bootstrap.min.js"></script>
  </head>
  <style>
  .ten{
  		padding-top:15px;
  }
  #six{
  		padding-top:50px;
  }
  #four{
  		margin-top:-110px;
  }
  body{
  		background-color:#8E8E8E;
  }
  </style>
  
  <body>
    <h1 align="center">欢迎使用个人信息管理平台</h1>
 	<div class="row">
   		<div>
   		<table width="100%" align="right"  >
              <tr  height="10" bgcolor="" align="center">
                  <td><a href="findAllPersonMessageServlet?userName=${userName}">个人信息管理<span class="sr-only"></span></a></td>
                  <td><a href="findAllFriendsServlet?userName=${userName}">通讯录管理</a></td>
                  <td><a href="findAllDateTimeServlet?userName=${userName}">日程安排管理</a></td>
                  <td><a href="findAllFileServlet?userName=${userName}">个人文件管理</a></td>
                  <td><a href="login/index.jsp">退出主页面</a></td>
                  <td><a href="">欢迎${userName}使用本系统！</a></td>
              </tr>
        </table>
   		</div>
   		
   		<div class="col-sm-3 col-sm-offset-3 col-md-8 col-md-offset-2 main">
        	<div class="ten">
          		<h1 align="center" class="page-header">个人文件管理</h1>
          	</div>
          	<div class="row placeholders">
            <div class="col-xs-6 col-sm-3 placeholder">
              <a href="fileManager/FileUpload.jsp" class="one">上传文件</a>
            </div>
            <div class="col-xs-6 col-sm-3 placeholder">
              <a href="findAllFileServlet?userName=${userName}" class="two">文件列表</a>
            </div>
            <div class="col-xs-6 col-sm-4 placeholder">
            	<form action="DownloadFileServlet?filename=${name}" method="post">
            		<input type="text" value="${name}">
            		<input type="submit" value="下载文件">
            	</form>
            </div>
          </div>
        </div>    
    </div>
    
    
    <div align="center" id="four">
    <form action="${pageContext.request.contextPath}/FileUploadServlet" enctype="multipart/form-data" method="post">
    	<table border="3" width="450">
    		<tr>
    			<td>文件标题</td>
    			<td>
    				<input type="text" name="title">
    			</td>
    		</tr>
    		<tr>
    			<td>选择文件</td>
    			<td>
    				<input type="file" name="f1">
    			</td>
    		</tr>
    		<tr align="center">
    			<td colspan="2">
    				<input type="submit" value="上传">
    				<input type="reset" value="清空">
    			</td>
    		</tr>
    	</table>
    	</form>
    </div>
  </body>
</html>
